package com.shop.order.service.impl;



import com.shop.order.dao.ShopCarCommMapper;
import com.shop.order.domain.ShopCarComm;
import com.shop.order.service.IShopCarCommService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 购物车，商品Service业务层处理
 * 
 * @author
 */
@Service
public class ShopCarCommServiceImpl implements IShopCarCommService
{
    @Autowired
    private ShopCarCommMapper shopCarCommMapper;

    /**
     * 查询购物车，商品
     * 
     * @param carId 购物车，商品主键
     * @return 购物车，商品
     */
    @Override
    public ShopCarComm selectShopCarCommByCarId(Long carId)
    {
        return shopCarCommMapper.selectShopCarCommByCarId(carId);
    }

    /**
     * 查询购物车，商品列表
     * 
     * @param shopCarComm 购物车，商品
     * @return 购物车，商品
     */
    @Override
    public List<ShopCarComm> selectShopCarCommList(ShopCarComm shopCarComm)
    {
        return shopCarCommMapper.selectShopCarCommList(shopCarComm);
    }

    /**
     * 新增购物车，商品
     * 
     * @param shopCarComm 购物车，商品
     * @return 结果
     */
    @Override
    public int insertShopCarComm(ShopCarComm shopCarComm)
    {
        return shopCarCommMapper.insertShopCarComm(shopCarComm);
    }

    /**
     * 修改购物车，商品
     * 
     * @param shopCarComm 购物车，商品
     * @return 结果
     */
    @Override
    public int updateShopCarComm(ShopCarComm shopCarComm)
    {
        return shopCarCommMapper.updateShopCarComm(shopCarComm);
    }

    /**
     * 批量删除购物车，商品
     * 
     * @param carIds 需要删除的购物车，商品主键
     * @return 结果
     */
    @Override
    public int deleteShopCarCommByCarIds(Long[] carIds)
    {
        return shopCarCommMapper.deleteShopCarCommByCarIds(carIds);
    }

    /**
     * 删除购物车，商品信息
     * 
     * @param carId 购物车，商品主键
     * @return 结果
     */
    @Override
    public int deleteShopCarCommByCarId(Long carId)
    {
        return shopCarCommMapper.deleteShopCarCommByCarId(carId);
    }
}
